import { v4 as uuidv4 } from 'uuid'

const packagingUuid = () => {
  const uuid = localStorage.getItem('uuid')
  if (uuid) {
    return uuid
  } else {
    const newUuid = uuidv4()
    localStorage.setItem('uuid', newUuid)
  }
}

export default packagingUuid
